import Rules from './Rules';

const { COMMON_RULE, LENGTH_RULE, PHONE_RULE, EMAIL_RULE, NUMBER_RULE } = Rules;

export const projectRules = {
  name: COMMON_RULE({ message: '请输入项目名称' }).concat(LENGTH_RULE(1, 30)),
  stock: COMMON_RULE({ message: '请选择计划品类' }).concat(LENGTH_RULE(1, 20)),
  description: COMMON_RULE({ message: '请输入项目说明' }).concat(LENGTH_RULE(1, 200)),
  entryTime: COMMON_RULE({ message: '请输入报名截止时间', type: 'number' }),
  openTime: COMMON_RULE({ message: '请输入开标时间', type: 'number' }),
  address: COMMON_RULE({ message: '请输入交货地点' }),
  descriptionOuter: COMMON_RULE({ message: '请输入对外文件说明' }).concat(LENGTH_RULE(1, 300)),
  paymentClause: COMMON_RULE({ message: '请输入付款条件' }),
  contact: COMMON_RULE({ message: '请输入合同对接人及联系方式' }),
  planList: COMMON_RULE({ message: '请选择计划' }),
  supplierList: COMMON_RULE({ message: '请选择供应商' }),
};

export const twiceRules = {
  reason: COMMON_RULE({ message: '请输入澄清理由' }),
  twiceOpenTime: COMMON_RULE({ type: 'number' }),
};
